﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

using System.ComponentModel.Composition;

namespace ETRobocon.RaceTraking.GamePresentation
{
    [Export(typeof(IRunnerStatusFireworksView))]
    [ExportMetadata("Kind","InCourse")]
    public class RunnerVisualStatusPartForInCourse : UserControlRunnerVisualStatusPart
    {
    }

    [Export(typeof(IRunnerStatusFireworksView))]
    [ExportMetadata("Kind", "OutCourse")]
    public class RunnerVisualStatusPartForOutCourse : UserControlRunnerVisualStatusPart
    {
    }

    /// <summary>
    /// UserControlRunnerVisualStatusPart.xaml の相互作用ロジック
    /// </summary>
    public partial class UserControlRunnerVisualStatusPart : UserControl, IRunnerStatusFireworksView
    {
        public UserControlRunnerVisualStatusPart()
        {
            InitializeComponent();
        }

        private string _runnerStatus;
        public string RunnerStatus
        {
            set
            {
//                this.StatusText.Text = value;
                _runnerStatus = value;
            }
            get
            {
//                return this.StatusText.Text;
                return _runnerStatus;
            }
        }


        #region IRunnerStatusFireworksView Members


        public void ShowFireworks()
        {
            this.Visibility = System.Windows.Visibility.Visible;
        }

        public void HideFireworks()
        {
            this.Visibility = System.Windows.Visibility.Hidden;
        }

        #endregion

        #region IRunnerStatusFireworksView Members


        public int PositionTop
        {
            get { return 0; }
        }

        public int PositionLeft
        {
            get { return 20; }
        }

        #endregion
    }
}
